<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>商户登录 - 未央店</title>
<link rel="stylesheet" href="css/layout.css" type="text/css" />
<link rel="stylesheet" href="css/shanghu_login_layout.css" type="text/css" />
<link rel="shortcut icon" href="images/favicon.ico" />
<script type="text/javascript" src="js/jquery_1.7.1.js"></script>
<script type="text/javascript" src="js/plugin_DOMWindow_js/jquery.DOMwindow.js"></script>



</head>


<body>
<div id="wrap">
  <div id="container">
    <div id="header">
	  <div id="logo">
	    <a href="http://127.0.0.1"><img src="images/jiayi_logo.jpg" width="200px" height="75px" alt="logo" style="margin-top:15px; border:0px;"/></a>
	  </div>
	</div>
	
	<div id="main">
	  <div id="left">
	    <p>我们的理念是：为商户提供展示的网络平台，让商户的产品和服务展现给您周围的消费者。</p>
		<p>为您带去真正的客流量，也为所有用户带来方便。加入我们，您将得到以下服务：</p>
		<br /><br />
	    <ul>
	      <li><img src="images/20071120213124181.png"  width="80px;" height="80px" style="float:left" /><div>从此，您将实体店搬到了互联网上，拥有了一个网络营销的平台。</div></li>
		  <li><img src="images/20071120213657427.png"  width="80px;" height="80px" style="float:left" /><div>您可以在网上主页里，发布您的折扣信息、产品/服务信息、商铺信息等。</div></li>
		  <li><img src="images/20071120213658634.png"  width="80px;" height="80px" style="float:left" /><div>网上主页的展示，会给您带来更多线下的客流量，增加您的营业额。</div></li>
		</ul>
	  </div>
	  
	  <div id="right">
	    <p>还没有账户？</p>
		<p id="create" style="text-align:center;"><a class="bkchange" href="/shanghu_reg.php">Go，注册一个！</a></p>
		<hr />
		<h1>商户登录</h1>
		<?php   //这段php是提交后才会运行，处理提交数据的。
		require_once(dirname(__FILE__)."/../include/httpclient.php");
		
		if( isset($_POST['email_account']) && isset($_POST['password']) ) //用户提交以后走这个分支
		{
			if($_POST['email_account']=='')
			  echo '<div id="warning"><img src="images/24.gif" style="float:left; margin-top:2px; margin-left:5px; margin-right:5px;"/><p>请输入您的账户email</p></div>';
			else if($_POST['password']=='')
			  echo '<div id="warning"><img src="images/24.gif" style="float:left; margin-top:2px; margin-left:5px; margin-right:5px;"/><p>请输入您的密码</p></div>';
			else //用户名密码都不为空
			{
				//验证这个用户名密码正不正确
				$arg=array( 'act' => 'check_party_login',
					        'email_account' => $_POST['email_account'],
					        'password' => md5($_POST['password'])
					      );
				$r = call_serviceurl(25,  $arg);

				if( $r == "serviceurl_unexpected_error")//serviceurl调用异常
				{
					echo '<script type="text/javascript">';
					echo 'setTimeout("location=\'./exception.php\'");';
					echo '</script>';
					exit();
				}
				if( $r == true ) //验证成功，登录成功
				{
					session_start();
		
					$_SESSION['email_account'] = $_POST['email_account'];
					$_SESSION['isRegLoginOk'] = 'OK';
					$_SESSION['lasttime'] = time();

					header("Location: http://127.0.0.1:8001/shanghu_page_edit.php");
					exit();
				}
				else //验证失败，登录失败
				{
					echo '<div id="warning"><img src="images/24.gif" style="float:left; margin-top:2px; margin-left:5px; margin-right:5px;"/><p>用户名或密码错误，请重新输入</p></div>';
				}

			}
		}
		else echo '';
		?>
		
		<form name="login" action="shanghu_login.php" method="post">
          <p>账户email：</p><input type="text" name="email_account" style="width:200px; height:25px;" id="email_input"/>
          <br /><br />
          <p>密码：</p><input type="password" name="password" style="width:200px; height:25px;"/>
		  <br /><br />
		  <input style="margin-left:50px; width:70px; height:30px;" type="submit" value="登录"/>
		  <a id="forget" class="bkchange" href="#help_tip" style="font-size:12px; margin-left:20px;">忘记密码？</a>

<script type="text/javascript"> 
		$('#forget').openDOMWindow({   //对弹出框DOMWindow进行设置。这段js不能放在<head>中，不起作用。放在靠近弹出框div的前面，起作用。
		eventType:'click', 
		loader:1, 
		loaderImagePath:'animationProcessing.gif', 
		loaderHeight:0, 
		loaderWidth:0,
		height:200,
		width:400,
		}); 
</script>

		  <div id="help_tip" style="display:none; font-size:16px;">
		    <div style="float:right;">点击框外任意处退出X</div>
		    <div class="sep" style="height:5px;"></div>
			<div style="float:left;">请联系 dream0411021@163.com 或者<br />拔打服务热线：13052492465</div>
		  </div>
        </form>
		<hr />
		<!--p style="font-size:12px;">也可以用合作网站帐号登录：</p>
		<div id="cooperation">
		  <img src="images/tencentpay.png" /> <img src="images/alipay2.png" />
		</div-->
	  </div>
	  
	</div>
	
	
	<div id="footer">
	  <ul>
		<li><a href="http://127.0.0.1/about.php?item=0" target=_blank>关于我们</a>|</li>
		<li><a href="http://127.0.0.1/about.php?item=1" target=_blank>联系我们</a>|</li>
		<li><a href="http://127.0.0.1/about.php?item=2" target=_blank>推广服务</a>|</li>
		<li><a href="http://127.0.0.1/about.php?item=3" target=_blank>人才招聘</a>|</li>
		<li><a href="http://127.0.0.1/about.php?item=4" target=_blank>友情链接</a></li>
      </ul>
	  <br />
      Copyright(c) 2013 weiyangdian.com All Rights Reserved
	</div>

  </div>
</div>
</body>

</html>


<script type="text/javascript">
function judgeCookie()
{
	var isCookie=navigator.cookieEnabled?true:false;
	if( ! isCookie )//说明浏览器cookie未启动
		alert( "您浏览器的 cookie 功能被禁用，请启用此功能。否则将有可能发生未知错误或无法登录注册。" );
}

function setFocus( focus_elementId )
{
	document.getElementById( focus_elementId ).focus();
}
window.onload = judgeCookie;
window.onload = function() { setFocus("email_input"); };
</script>